import request from '@/utils/request';

// 根据条件分页查询数据中心列表
export function getDataList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/dataCenter/list',
		method: 'post',
		data: data,
	});
}

// 根据参数编号获取详细信息
export function getDetail(dictId: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/dataCenter/' + dictId,
		method: 'get',
	});
}

// 新增数据中心
export function addDataCenter(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/dataCenter',
		method: 'post',
		data: data,
	});
}

// 修改数据中心
export function updateDataCenter(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/dataCenter',
		method: 'put',
		data: data,
	});
}

// 删除数据中心
export function delDataCenter(ids: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/dataCenter/' + ids,
		method: 'delete',
	});
}
